package demo;

import com.lijinjiang.beautyeye.BeautyEyeLNFHelper;

import javax.swing.*;
import java.awt.*;

/**
 * @ClassName demo.JTableDemo
 * @Description TODO
 * @Author Li
 * @Date 2022/8/28 0:54
 * @ModifyDate 2022/8/28 0:54
 * @Version 1.0
 */
public class JTableDemo {
    public static void main(String[] args) {
        try {
            BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.generalNoTranslucencyShadow;
            com.lijinjiang.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF();
        } catch (Exception e) {

        }
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

        JTabbedPane tabbedPane = new JTabbedPane();

        JTable table = new JTable(100,26);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        JScrollPane scrollPane = new JScrollPane();
        scrollPane.setViewportView(table);

        tabbedPane.addTab("Tab 1", scrollPane);


        JPanel jPanel = new JPanel();
        jPanel.setLayout(new BorderLayout());

        jPanel.add(tabbedPane);

        frame.setContentPane(jPanel);

        frame.pack();
        frame.setSize(800, 600);
        frame.setLocationRelativeTo(null);


        table.setBorder(null);
        scrollPane.setBorder(null);
        tabbedPane.setBorder(null);
        jPanel.setBorder(null);
        frame.setVisible(true);



        /*
        *  JPanel panel = new JPanel();
                Box box = Box.createVerticalBox();
                box.setBorder(null);
                for (int i = 1; i <= 100; i++) {
                    box.add(new JLabel("这是第 " + i + " 行数据！"));
                }
                panel.add(box);
                panel.setBorder(null);
                return panel;
        * */


    }
}
